package com.gjr.eduservice.service;

import com.gjr.eduservice.entity.EduChapter;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gjr.eduservice.entity.chapter.ChapterVo;

import java.util.List;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author gjr
 * @since 2022-09-01
 */
public interface EduChapterService extends IService<EduChapter> {

    /**
     * 课程大纲列表，根据课程id进行查询
     *
     * @param courseId 课程id
     * @return 返回章节和小节
     */
    List<ChapterVo> getChapterVideoByCourseId(String courseId);

    /**
     * 删除章节：如果该章节下有小节不能完成删除
     *
     * @param chapterId 章节id
     * @return 返回值
     */
    boolean deteleChapter(String chapterId);

    /**
     * 根据课程id删除章节
     *
     * @param courseId 课程id
     */
    void removeChapterByCourseId(String courseId);
}
